It is not uncommon for exceptions to occur in binary code (also referred to as executable code). An exception has been defined as an event that occurs during execution of a program that disrupts the normal flow of instructions during the execution of that program.
These exceptions are handled by the operating system, which typically captures the location (or the function) in the binary code at which the exception occurs, together with some additional details about the exception that occurred, for example, the stack trace, register values, the name of the application or object that caused the error, and the like. The operating system then searches through the list of methods that have already been called (the call stack) to search for a routine that can handle the exception. This routine is referred to as the exception handler. If no exception handler is found, then the operating system (if configured to do so) may launch a debugging application and provide the exception to that debugging application. Regardless of whether a debugging application is launched, the operating system will typically log the exception to an event log.
Binary code is typically generated from source code (which is compiled to create the binary code). During this compilation process, useful information is lost. This lost information includes, for example, the names of the functions in the source code, the location of these functions in memory, the types of parameters expected by each function, global and local variable names, source code line information (which allows each command in binary code to be mapped back to one or more lines of source code associated with that command), and the like.
Some programming environments (such as the Microsoft (trade mark) .NET framework, and Java (trade mark)) create intermediate code that is compiled at runtime to create binary code. For such programming environments, significantly more information is available to the target computer system executing the code at runtime than just the binary code. The collection of files that contain the intermediate code is typically referred to as an assembly.
It remains, however, a difficult and time-consuming task to trace an exception to the original source code, even using these additional files. It would be better if this process could be improved.